From 91a736a09ed9f5e2d11c733535b479fbf4f4fddf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 17 Sep 2025 19:04:46 +0200 Subject: [PATCH] gdm/util: Clear the request if user verifier connection is closed Similarly to previous commit, in case the user verifier connection is closed we should just clear the user verifier instance, since starting from this point is going to be just invalid. Part-of: --- js/gdm/util.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/gdm/util.js b/js/gdm/util.js index f762b79ec..3334d61f0 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -200,6 +200,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { _clearUserVerifier() { if (this._userVerifier) { this._disconnectSignals(); + this._userVerifier.get_connection().disconnectObject(this); this._userVerifier.run_dispose(); this._userVerifier = null; if (this._userVerifierChoiceList) { @@ -506,6 +507,8 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._clearUserVerifier(); this._userVerifier = await this._client.open_reauthentication_channel( userName, this._cancellable); + this._userVerifier.get_connection().connectObject('closed', + () => this.clear(), this); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return; @@ -538,6 +541,8 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._clearUserVerifier(); this._userVerifier = await this._client.get_user_verifier(this._cancellable); + this._userVerifier.get_connection().connectObject('closed', + () => this.clear(), this); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return; -- 2.39.5